package org.ly.uap.client.validation;

import javax.servlet.FilterConfig;

public class Cas10TicketValidationFilter extends AbstractTicketValidationFilter {
    protected final TicketValidator getTicketValidator(FilterConfig filterConfig) {
        String casServerUrlPrefix = getPropertyFromInitParams(filterConfig, "casServerUrlPrefix", null);
        Cas10TicketValidator validator = new Cas10TicketValidator(casServerUrlPrefix);
        validator.setRenew(parseBoolean(getPropertyFromInitParams(filterConfig, "renew", "false")));
        validator.setHostnameVerifier(getHostnameVerifier(filterConfig));
        validator.setEncoding(getPropertyFromInitParams(filterConfig, "encoding", null));

        return validator;
    }
}
